package com.example.myapplication.kotlin


fun main() {
    val s = Student("张三", "黄色")
//    s.study()
//    s.playGame()
//    s.eat("隆江猪脚饭拼烧鹅，烧鸭，肉卷，叉烧")

    println(s)
}

// 定义 接口 2个属性，2个方法
interface IStudent {
    var name: String
    var hairColor: String

    fun study(): String

    fun playGame(): Int
}

interface IEat {
    fun eat(food: String)
}

//class Student constructor(override var name: String, override var hairColor: String) : IStudent {
class Student(override var name: String, override var hairColor: String) : IStudent, IEat {
    override fun study(): String {
        println("ε=(´ο｀*)))唉，啊~，好难啊~")
        return "10000"
    }

    override fun playGame(): Int {
        println("打三角洲")
        return 100
    }

    override fun eat(food: String) {
        // 模版字符串 字符串内部 用 $变量
        println("吃$food，吧唧吧唧，好好吃")
    }
}